home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / X11 / XGrabKeyboard.z / XGrabKeyboard
Encoding:
Text File  |  2002-10-03  |  8.2 KB  |  199 lines

  1.  
  2.  
  3.  
  4.      XXXXGGGGrrrraaaabbbbKKKKeeeeyyyybbbbooooaaaarrrrdddd((((3333XXXX11111111))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....6666)))) XXXXGGGGrrrraaaabbbbKKKKeeeeyyyybbbbooooaaaarrrrdddd((((3333XXXX11111111))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.           XGrabKeyboard, XUngrabKeyboard - grab the keyboard
  10.  
  11.      SSSSYYYYNNNNTTTTAAAAXXXX
  12.           int XGrabKeyboard(_d_i_s_p_l_a_y, _g_r_a_b__w_i_n_d_o_w, _o_w_n_e_r__e_v_e_n_t_s,
  13.           _p_o_i_n_t_e_r__m_o_d_e, _k_e_y_b_o_a_r_d__m_o_d_e, _t_i_m_e)
  14.                 Display *_d_i_s_p_l_a_y;
  15.                 Window _g_r_a_b__w_i_n_d_o_w;
  16.                 Bool _o_w_n_e_r__e_v_e_n_t_s;
  17.                 int _p_o_i_n_t_e_r__m_o_d_e, _k_e_y_b_o_a_r_d__m_o_d_e;
  18.                 Time _t_i_m_e;
  19.  
  20.           XUngrabKeyboard(_d_i_s_p_l_a_y, _t_i_m_e)
  21.                 Display *_d_i_s_p_l_a_y;
  22.                 Time _t_i_m_e;
  23.  
  24.      AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  25.           _d_i_s_p_l_a_y   Specifies the connection to the X server.
  26.  
  27.           _g_r_a_b__w_i_n_d_o_w
  28.                     Specifies the grab window.
  29.  
  30.           _k_e_y_b_o_a_r_d__m_o_d_e
  31.                     Specifies further processing of keyboard events.
  32.                     You can pass _G_r_a_b_M_o_d_e_S_y_n_c or _G_r_a_b_M_o_d_e_A_s_y_n_c.
  33.  
  34.           _o_w_n_e_r__e_v_e_n_t_s
  35.                     Specifies a Boolean value that indicates whether
  36.                     the keyboard events are to be reported as usual.
  37.  
  38.           _p_o_i_n_t_e_r__m_o_d_e
  39.                     Specifies further processing of pointer events.
  40.                     You can pass _G_r_a_b_M_o_d_e_S_y_n_c or _G_r_a_b_M_o_d_e_A_s_y_n_c.
  41.  
  42.           _t_i_m_e      Specifies the time.  You can pass either a
  43.                     timestamp or _C_u_r_r_e_n_t_T_i_m_e.
  44.  
  45.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  46.           The _X_G_r_a_b_K_e_y_b_o_a_r_d function actively grabs control of the
  47.           keyboard and generates _F_o_c_u_s_I_n and _F_o_c_u_s_O_u_t events.  Further
  48.           key events are reported only to the grabbing client.
  49.           _X_G_r_a_b_K_e_y_b_o_a_r_d overrides any active keyboard grab by this
  50.           client.  If owner_events is _F_a_l_s_e, all generated key events
  51.           are reported with respect to grab_window. If owner_events is
  52.           _T_r_u_e and if a generated key event would normally be reported
  53.           to this client, it is reported normally; otherwise, the
  54.           event is reported with respect to the grab_window. Both
  55.           _K_e_y_P_r_e_s_s and _K_e_y_R_e_l_e_a_s_e events are always reported,
  56.           independent of any event selection made by the client.
  57.  
  58.           If the keyboard_mode argument is _G_r_a_b_M_o_d_e_A_s_y_n_c, keyboard
  59.           event processing continues as usual. If the keyboard is
  60.  
  61.  
  62.  
  63.      Page 1                                          (printed 10/3/02)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      XXXXGGGGrrrraaaabbbbKKKKeeeeyyyybbbbooooaaaarrrrdddd((((3333XXXX11111111))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....6666)))) XXXXGGGGrrrraaaabbbbKKKKeeeeyyyybbbbooooaaaarrrrdddd((((3333XXXX11111111))))
  71.  
  72.  
  73.  
  74.           currently frozen by this client, then processing of keyboard
  75.           events is resumed.  If the keyboard_mode  argument is
  76.           _G_r_a_b_M_o_d_e_S_y_n_c, the state of the keyboard (as seen by client
  77.           applications) appears to freeze, and the X server generates
  78.           no further keyboard events until the grabbing client issues
  79.           a releasing _X_A_l_l_o_w_E_v_e_n_t_s call or until the keyboard grab is
  80.           released.  Actual keyboard changes are not lost while the
  81.           keyboard is frozen; they are simply queued in the server for
  82.           later processing.
  83.  
  84.           If pointer_mode is _G_r_a_b_M_o_d_e_A_s_y_n_c, pointer event processing
  85.           is unaffected by activation of the grab. If pointer_mode is
  86.           _G_r_a_b_M_o_d_e_S_y_n_c, the state of the pointer (as seen by client
  87.           applications) appears to freeze, and the X server generates
  88.           no further pointer events until the grabbing client issues a
  89.           releasing _X_A_l_l_o_w_E_v_e_n_t_s call or until the keyboard grab is
  90.           released.  Actual pointer changes are not lost while the
  91.           pointer is frozen; they are simply queued in the server for
  92.           later processing.
  93.  
  94.           If the keyboard is actively grabbed by some other client,
  95.           _X_G_r_a_b_K_e_y_b_o_a_r_d fails and returns _A_l_r_e_a_d_y_G_r_a_b_b_e_d.  If
  96.           grab_window is not viewable, it fails and returns
  97.           _G_r_a_b_N_o_t_V_i_e_w_a_b_l_e.  If the keyboard is frozen by an active
  98.           grab of another client, it fails and returns _G_r_a_b_F_r_o_z_e_n.  If
  99.           the specified time is earlier than the last-keyboard-grab
  100.           time or later than the current X server time, it fails and
  101.           returns _G_r_a_b_I_n_v_a_l_i_d_T_i_m_e.  Otherwise, the last-keyboard-grab
  102.           time is set to the specified time (_C_u_r_r_e_n_t_T_i_m_e is replaced
  103.           by the current X server time).
  104.  
  105.           _X_G_r_a_b_K_e_y_b_o_a_r_d can generate _B_a_d_V_a_l_u_e and _B_a_d_W_i_n_d_o_w errors.
  106.  
  107.           The _X_U_n_g_r_a_b_K_e_y_b_o_a_r_d function releases the keyboard and any
  108.           queued events if this client has it actively grabbed from
  109.           either _X_G_r_a_b_K_e_y_b_o_a_r_d or _X_G_r_a_b_K_e_y.  _X_U_n_g_r_a_b_K_e_y_b_o_a_r_d does not
  110.           release the keyboard and any queued events if the specified
  111.           time is earlier than the last-keyboard-grab time or is later
  112.           than the current X server time.  It also generates _F_o_c_u_s_I_n
  113.           and _F_o_c_u_s_O_u_t events.  The X server automatically performs an
  114.           _U_n_g_r_a_b_K_e_y_b_o_a_r_d request if the event window for an active
  115.           keyboard grab becomes not viewable.
  116.  
  117.      DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  118.           _B_a_d_V_a_l_u_e  Some numeric value falls outside the range of
  119.                     values accepted by the request.  Unless a specific
  120.                     range is specified for an argument, the full range
  121.                     defined by the argument's type is accepted.  Any
  122.                     argument defined as a set of alternatives can
  123.                     generate this error.
  124.  
  125.           _B_a_d_W_i_n_d_o_w A value for a Window argument does not name a
  126.  
  127.  
  128.  
  129.      Page 2                                          (printed 10/3/02)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      XXXXGGGGrrrraaaabbbbKKKKeeeeyyyybbbbooooaaaarrrrdddd((((3333XXXX11111111))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....6666)))) XXXXGGGGrrrraaaabbbbKKKKeeeeyyyybbbbooooaaaarrrrdddd((((3333XXXX11111111))))
  137.  
  138.  
  139.  
  140.                     defined Window.
  141.  
  142.      SSSSEEEEEEEE AAAALLLLSSSSOOOO
  143.           XAllowEvents(3X11), XGrabButton(3X11), XGrabKey(3X11),
  144.           XGrabPointer(3X11)
  145.           _X_l_i_b - _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.      Page 3                                          (printed 10/3/02)
  196.  
  197.  
  198.  
  199.